package com.shadow.bus.main.search;

import android.support.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.shadow.bus.config.ItemFiled;
import com.shadow.bus.entity.PartEntity;
import com.tepth.shadow.ui.recycler.MultipleItemEntity;

import java.util.List;

import busfix.tepth.com.shadow_bus.R;

/**
 * @author zhangyu
 * @date 2018/7/6
 */

public class SearchAdapter extends BaseQuickAdapter<MultipleItemEntity, BaseViewHolder> {
    public SearchAdapter(int layoutResId, @Nullable List<MultipleItemEntity> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, MultipleItemEntity item) {
        PartEntity partEntity = item.getField(ItemFiled.ITEM_OBJ);
        helper.setText(R.id.tv_text, partEntity.getName());
    }
}
